import { apiBindUserUrl, apiLoginUrl, apiUpdateUnBindUserInfoUrl,apiCheckSid } from "./apiurl";
import { request } from "./ApiManage";

export async function login() {
	const { code } = await wx.login();
	return request(apiLoginUrl, {
		code: code
	})
}


export async function bindUser({ bindid, userId, pwd }) {
	return request(apiBindUserUrl, {
		bindId: bindid,
		userId: userId,
		pwd: pwd
	})
}

export async function unBindUserInfo(){
	const { code } = await wx.login();
	return request(apiUpdateUnBindUserInfoUrl, {
		code: code
	})
}

export async function checkSid(){
	return request(apiCheckSid)
}